Action hook 'in_plugin_update_message-{$file}'

in WP Core File wp-admin/includes/update.php at line 616

View Source

in_plugin_update_message-{$file}

Action Hook
Description
Fires at the end of the update message container in each row of the plugins list table. The dynamic portion of the hook name, `$file`, refers to the path of the plugin's primary file relative to the plugins directory. }

Hook Information

File Location wp-admin/includes/update.php View on GitHub
Hook Type Action
Line Number 616

Hook Parameters

Type Name Description
array $plugin_data An array of plugin metadata. See get_plugin_data() and the {@see 'plugin_row_meta'} filter for the list of possible values.
object $response { An object of metadata about the available plugin update.

Usage Examples

Basic Usage
<?php
// Hook into in_plugin_update_message-{$file}
add_action('in_plugin_update_message-{$file}', 'my_custom_function', 10, 2);

function my_custom_function($plugin_data, $response) {
    // Your custom code here
}

Source Code Context

wp-admin/includes/update.php:616 - How this hook is used in WordPress core
<?php
 611  		 *     @type string   $requires     The version of WordPress which the plugin requires.
 612  		 *     @type string   $tested       The version of WordPress the plugin is tested against.
 613  		 *     @type string   $requires_php The version of PHP which the plugin requires.
 614  		 * }
 615  		 */
 616  		do_action( "in_plugin_update_message-{$file}", $plugin_data, $response ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
 617  
 618  		echo '</p></div></td></tr>';
 619  	}
 620  }
 621  

PHP Documentation

<?php
/**
		 * Fires at the end of the update message container in each
		 * row of the plugins list table.
		 *
		 * The dynamic portion of the hook name, `$file`, refers to the path
		 * of the plugin's primary file relative to the plugins directory.
		 *
		 * @since 2.8.0
		 *
		 * @param array  $plugin_data An array of plugin metadata. See get_plugin_data()
		 *                            and the {@see 'plugin_row_meta'} filter for the list
		 *                            of possible values.
		 * @param object $response {
		 *     An object of metadata about the available plugin update.
		 *
		 *     @type string   $id           Plugin ID, e.g. `w.org/plugins/[plugin-name]`.
		 *     @type string   $slug         Plugin slug.
		 *     @type string   $plugin       Plugin basename.
		 *     @type string   $new_version  New plugin version.
		 *     @type string   $url          Plugin URL.
		 *     @type string   $package      Plugin update package URL.
		 *     @type string[] $icons        An array of plugin icon URLs.
		 *     @type string[] $banners      An array of plugin banner URLs.
		 *     @type string[] $banners_rtl  An array of plugin RTL banner URLs.
		 *     @type string   $requires     The version of WordPress which the plugin requires.
		 *     @type string   $tested       The version of WordPress the plugin is tested against.
		 *     @type string   $requires_php The version of PHP which the plugin requires.
		 * }
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 2
  • File: wp-admin/includes/update.php
Related Hooks

Related hooks will be displayed here in future updates.